<header>
  <div class="left">
    <button type="button" (click)="goBack()">
      <span class="header-icon"><i class="bwi bwi-angle-left" aria-hidden="true"></i></span>
      <span>{{ "back" | i18n }}</span>
    </button>
  </div>
  <h1 class="center">
    <span class="title">{{ "premiumMembership" | i18n }}</span>
  </h1>
  <div class="right"></div>
</header>
<main tabindex="-1">
  <div class="content">
    <ng-container *ngIf="!isPremium">
      <p class="text-center lead">{{ "premiumNotCurrentMember" | i18n }}</p>
      <p>{{ "premiumSignUpAndGet" | i18n }}</p>
      <ul class="bwi-ul">
        <li>
          <i class="bwi bwi-li bwi-check text-success" aria-hidden="true"></i>
          {{ "ppremiumSignUpStorage" | i18n }}
        </li>
        <li>
          <i class="bwi bwi-li bwi-check text-success" aria-hidden="true"></i>
          {{ "premiumSignUpTwoStepOptions" | i18n }}
        </li>
        <li>
          <i class="bwi bwi-li bwi-check text-success" aria-hidden="true"></i>
          {{ "ppremiumSignUpReports" | i18n }}
        </li>
        <li>
          <i class="bwi bwi-li bwi-check text-success" aria-hidden="true"></i>
          {{ "ppremiumSignUpTotp" | i18n }}
        </li>
        <li>
          <i class="bwi bwi-li bwi-check text-success" aria-hidden="true"></i>
          {{ "ppremiumSignUpSupport" | i18n }}
        </li>
        <li>
          <i class="bwi bwi-li bwi-check text-success" aria-hidden="true"></i>
          {{ "ppremiumSignUpFuture" | i18n }}
        </li>
      </ul>
      <p class="text-center lead">{{ priceString }}</p>
      <button type="button" class="btn primary block" (click)="purchase()">
        <b>{{ "premiumPurchase" | i18n }}</b>
      </button>
      <button
        #refreshBtn
        type="button"
        (click)="refresh()"
        [disabled]="$any(refreshBtn).loading"
        [appApiAction]="refreshPromise"
        class="btn link block"
      >
        <span [hidden]="$any(refreshBtn).loading">{{ "premiumRefresh" | i18n }}</span>
        <i
          class="bwi bwi-spinner bwi-spin bwi-lg bwi-fw"
          [hidden]="!$any(refreshBtn).loading"
          aria-hidden="true"
        ></i>
      </button>
    </ng-container>
    <ng-container *ngIf="isPremium">
      <p class="text-center lead">{{ "premiumCurrentMember" | i18n }}</p>
      <p class="text-center">{{ "premiumCurrentMemberThanks" | i18n }}</p>
      <button type="button" class="btn block primary" (click)="manage()">
        <b>{{ "premiumManage" | i18n }}</b>
      </button>
    </ng-container>
  </div>
</main>
